home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2008 February / PCWFEB08.iso / Software / Freeware / Miro 1.0 / Miro_Installer.exe / chrome / content / three_choice_dialog.xul < prev    next >
Encoding:
Extensible Markup Language  |  2007-11-12  |  1.5 KB  |  42 lines

  1. <?xml version="1.0"?>
  2. <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
  3. <?xml-stylesheet href="main.css" type="text/css"?>
  4.  
  5. <dialog id="democracy-dialog"
  6.     xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  7.     xmlns:html="http://www.w3.org/1999/xhtml"
  8.         title=""
  9.         maxwidth="400"
  10.         buttons="accept,cancel,extra1"
  11.         ondialogaccept="onaccept();"
  12.         ondialogextra1="onextra1();"
  13.         ondialogcancel="oncancel();"
  14.         onload="onload()">
  15.     <script type="text/javascript">
  16. function onload() {
  17.   var args = window.arguments[0];
  18.   var description = document.getElementById("description");
  19.   description.appendChild(document.createTextNode(args["description"]));
  20.   var dialog = document.getElementById("democracy-dialog");
  21.   document.title = args['title'];
  22.   dialog.getButton('accept').label = args['defaultLabel'];
  23.   dialog.getButton('extra1').label = args['secondLabel'];
  24.   dialog.getButton('cancel').label = args['thirdLabel'];
  25. }
  26.  
  27. var pybridge = Components.classes["@participatoryculture.org/dtv/pybridge;1"].
  28.                 getService(Components.interfaces.pcfIDTVPyBridge);
  29. function onaccept() {
  30.   pybridge.handleSimpleDialog(window.arguments[0]['id'], 0);
  31. }
  32. function onextra1() {
  33.   pybridge.handleSimpleDialog(window.arguments[0]['id'], 1);
  34.   window.close();
  35. }
  36. function oncancel() {
  37.   pybridge.handleSimpleDialog(window.arguments[0]['id'], 2);
  38. }
  39.    </script>
  40.    <description id="description" />
  41. </dialog>
  42.